package com.example.demo.Controller;

import com.example.demo.Services.ServiceController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
//    @Autowired
//    private ServiceController serviceController;
//      private ServiceController serviceController;
//      public UserController(ServiceController serviceController){
//          this.serviceController=serviceController;
//      }
    @Autowired
    private ServiceController serviceController;
    public void setServiceController(ServiceController serviceController){
        this.serviceController=serviceController;
    }

    public void say(){
        System.out.println("Controller......");
        serviceController.say();
    }
}
